package com.example.work4.data

import android.view.View
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.example.work4.view.MyDialog

@Entity(tableName = "record")
class Record(@PrimaryKey(autoGenerate = true)
             @ColumnInfo(name = "id", typeAffinity = ColumnInfo.INTEGER)
             var id:Int?,
             @ColumnInfo(name = "title", typeAffinity = ColumnInfo.TEXT)
             var Title:String,
             @ColumnInfo(name = "content", typeAffinity = ColumnInfo.TEXT)
             var content:String)
{
    fun click2(view: View){
        val m:MyDialog=MyDialog(view.context)
        m.showRecordDialog(this)
    }


}